﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;
using Entities;

namespace LoginP
{
    public static class LoginUser
    {
        public static LoginData Instance
        {
            get
            {
                return (LoginData)HttpContext.Current.Session["LoginData"];
            }
            set
            {
                HttpContext.Current.Session["LoginData"] = value;
            }
        }
        public static bool Online
        {
            get
            {
                if (HttpContext.Current.Session["Online"] != null)
                    return (bool)HttpContext.Current.Session["Online"];
                else
                    return false;
            }
            set
            {
                HttpContext.Current.Session["Online"] = value;
            }
        }
    }
}